home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 56
/
056.d81
/
castle of spirit
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
8KB
|
213 lines
1 print"[147]":gosub2000:clr
10 poke53280,0:poke53281,0:m=0:rm=1:printchr$(147);chr$(14);chr$(30):z=1
20 nr=10:nv=22:nn=14:no=7
25 dimmp(nr,7),vb$(nv),no$(nn),rn$(nr),ob$(no,1),ob(no)
30 fori=1tonr:forj=1to6:readmp(i,j):nextj,i:fori=1tonv:readvb$(i):next
40 fori=1tonn:readno$(i):next:fori=1tonr:readrn$(i):next
50 fori=1tono:readob$(i,0):readob$(i,1):readob(i):next
60 mp(1,7)=1:printchr$(18)"[159]"rn$(rm):gosub870:goto930
70 ifint(rnd(0)*100)+1<5then930
80 ifm=14andob(5)>0then1010
90 ifm=14andob(5)=0thengosub1430
100 print"[155][215]hat now? [154]";:limit=28:gosub50000:am$=w$:print"[153]":iflen(am$)>20then70
110 fori=1tolen(am$):ifmid$(am$,i,1)=" "thengosub7000
112 next
115 fori=1tolen(am$):ifmid$(am$,i,1)<>" "thennext:w1$=am$:w2$="":goto130
120 rem moved to 7000
130 fori=1tonv
135 ifvb$(i)<>left$(w1$,3)thennext:print"[201] don't know "w1$:goto70
140 w1=i:ifw2$=""thenw2=0:goto180
150 fori=1tonn:ifno$(i)=left$(w2$,3)thenw2=i:goto180
160 next:fori=1tono:ifleft$(w2$,3)=ob$(i,0)thenw2=i:goto180
170 next:print"[201] don't know "w2$:goto70
180 m=m+1:ifw1<10then1060
190 ifw1>13andw1<17andw2=0thenprintchr$(18)rn$(rm):gosub870:goto70
200 ifw1=18thenprintm"moves.":print:goto70
210 ifw1<14andw1>9then760
220 ifw1=19orw1=20then830
230 am=0:if(w1=15orw1=16)andw2=2andob(2)=0thenam=1
240 ifam=1thena$="[213]idsd!@sd!uisdd!ctuunor!uid!bnmns!ng":gosub1190
250 ifam=1thena$="@!us@gghb!mhfiu!hlcdeede!ho!uid!rhed/":gosub1190:goto70
260 if(w1=15orw1=16)andw2=2thenprint"[196]on't have it!":goto70
270 ifw1=17andw2=9andrm<>3andrm<>5thenprint"[196]on't need to!":goto70
280 ifw1=17andw2=9and(oi=8oroi=rm)thenprint"[196]on't need to!":goto70
290 ifw1=17andw2=9thenoi=oi+rm:print"[207][203].":goto70
300 ifw1=21andw2>9andw2<14andob(2)>0thenprint"[217]ou don't have it!":goto70
310 ifw1=21andw2=10thenprint"[217]ou have to specify a color.":goto70
320 ifw1=21andw2=11thenprint"[194]oom!!!!":print"[217]ou made a mistake!":goto1400
330 ifw1=21andw2=13andbu>0thenprint"[194]oom!!!!":print"[207]ops!":goto1400
340 ifw1=21andw2=13andbu=0thenbu=1:print"[195][204][201][195][203].":goto70
350 ifw1=21andw2=12andbu<>1thenprint"[194]oom!!!!":print"[207]oops!":goto1400
360 ifw1=21andw2=12andbu=1thenprint"[212]he box opens and [201] now have a key."
370 ifw1=21andw2=12andbu=1thenbu=2:ob(4)=0:goto70
380 ifw1=22andw2=9andrm<>5thenprint"[195]an't do that yet!":goto70
390 ifw1=22andw2=9andrm=5andob(4)=0thenprint"[207]k.":mp(5,2)=6:goto70
400 ifw1=22andw2=9thenprint"[195]an't do that yet!":goto70
410 print"[201] don't understand you.":m=m-1:goto70
420 a$="[216]nt!@sd!ho!@!m@sfd!bntsux@se!vhui":gosub1190
430 a$="@!ehm@qhe@ude!ride!ho!uid!bnsods/":gosub1190
440 a$="[213]id!rntui!defd!hr!mhode!cx!@o!nme":gosub1190
450 a$="runod!v@mm!vhui!@!qnsubtmmhr!ho!uid":gosub1190
455 a$="lheemd/":gosub1190
460 return
470 a$="[213]idsd!hr!@!lnorusntr!f@ud!rdu!ho!uid":gosub1190
480 a$="onsui!v@mm/!![213]n!uid!rntui!hr!uid":gosub1190
490 a$="bntsux@se!@oe!un!uid!d@ru!hr!@!rl@mm":gosub1190
495 a$="intrd/":gosub1190
500 return
510 a$="[213]ihr!hr!uid!d@ru!bntsux@se/![192]!rl@mm":gosub1190
520 a$="f@q!dyhrur!ho!uid!rntui!v@mm!ng!uid":gosub1190
530 a$="b@rumd/!![192]!enlhoddshof!unvds!ru@oer":gosub1190
540 a$="rhmintduude!@f@horu!uid!rjx-!uid":gosub1190
550 a$="dous@obd!ng!vihbi!hr!bnwdsde!ho!whodr/":gosub1190:return
560 a$="[216]nt!ru@oe!ho!@!rl@mm!f@q!ho!uid!v@mm":gosub1190
570 a$="ng!vihbi!uid!nomx!dyhu!hr!onsui/":gosub1190:return
580 a$="[213]ihr!hr!uid!vdru!bntsux@se/![213]id!ru@cmdr":gosub1190
590 a$="@sd!un!uid!rntui-!@oe!@!enlhoddshof":gosub1190
600 a$="unvds!ru@oer!rhmintduude!@f@horu!uid":gosub1190
610 a$="rjx-!uid!dous@obd!ng!vihbi!hr!bnwdsde":gosub1190
615 a$="ho!whodr/":gosub1190
620 return
630 a$="[216]nt!ru@oe!ho!uid!ru@cmdr-!vihbi!i@wd":gosub1190
640 a$="@qq@sdoumx!onu!cddo!jdqu!wdsx!bmddo/":gosub1190:return
650 a$="[213]idsd!@sd!w@shntr!unnmr!@oe!nuids":gosub1190
660 a$="hudlr!ng!on!ns!rnld!houdsdru!ho!uid":gosub1190
670 a$="unnm!ride/![213]id!dous@obd!hr!onsui/":gosub1190:return
680 a$="[213]ihr!hr!uid!cnuunl!gmnns!ng!nod!ng":gosub1190
690 a$="uid!l@ox!unvdsr!ho!uihr!b@rumd/![192]o":gosub1190
700 a$="dyhu!hr!rntui!ng!idsd/":gosub1190:return
710 a$="[213]id!doemdrr!gmnnsr!@mm!@qqd@s!uid":gosub1190:mp(rm,7)=0
720 a$="r@ld!ho!uihr!unvds/![212]q!ns!envo>":gosub1190:return
730 a$="[213]ihr!hr!@!rl@mm!ft@se&r!ri@bj/":gosub1190
740 a$="[215]@shntr!dwdsxe@x!hudlr!@sd!no!uid":gosub1190
750 a$="gmnns/":gosub1190:return
760 ifw2=0thenprint"[215][200][193][212]?":goto70
770 ifw2=14thenw2=7:w2$="magnet"
780 fori=1tono:ifleft$(w2$,3)=ob$(i,0)and(rm=ob(i)or(w1=12orw1=13))then810
790 next:ifw1=12orw1=13thenprint"[196]on't have it.":goto70
800 print"[196]on't see it.":goto70
810 ifw1=10orw1=11thenob(i)=0:printob$(i,1)" is taken":goto70
820 ob(i)=rm:printob$(i,1)" is dropped":goto70
830 print"[217]ou are carrying:"
840 am=0:fori=1tono:ifob(i)=0thenam=1:printob$(i,1)
850 next:ifam=0thenprint"[206][207][212][200][201][206][199]!"
860 goto70
870 onrmgosub420,470,510,560,580,630,650,680,710,730
880 am=0:fori=1tono:ifrm=ob(i)andam=0thenam=1:print"[217]ou see ";
890 ifrm=ob(i)thenprintob$(i,1)", ";
900 next:ifam>0thenprint"[157][157]."
910 return
920 print"[201] don't understand you":m=m-1:goto70
930 a$="[214]ihmru!fnhof!@cntu!xnts!ctrhodrr":gosub1190
940 a$="@!lnsd!ui@o!rmhfiumx!eds@ofde":gosub1190
950 a$="@qq@shuhno!@qqd@sr/![201]d!rddlr!un!cd":gosub1190
960 a$="rbsd@lhof!rnld!onordord!@cntu!on":gosub1190
970 a$="drb@qd/![213]id!finru!wdsx!hlqnmhudmx":gosub1190
980 a$="m@tfir!ho!xnts!g@bd-!uido!w@ohridr!un":gosub1190
990 a$="vi@udwds!torhfiumx!qm@bd!id!@qqd@sde":gosub1190
995 a$="gsnl/":gosub1190
1000 goto80
1010 a$="[216]nt!pthud!rteedomx!@sd!houdsstqude!cx":gosub1190
1020 a$="@o!nwdsqnvdshof!w@lqhsd/![214]ihmd":gosub1190
1030 a$="rustffmhof!gns!xnts!mhgd!id!b@mlmx":gosub1190
1040 a$="eshojr!xnts!cmnne/![216]nt!i@wd!ehde/":gosub1190
1050 goto1400
1060 ifw1>6andw1<10andw2=7and(rm=5orrm=3)and(oi=rmoroi=8)thenrm=8:goto1170
1070 if(w1<7or(w1>6andw1<10andw2=1))andrm=2andob(6)=0andob(7)=0then1490
1080 ifw1<7or(w1>6andw1<10andw2<7)then1120
1090 ifw2=8thenrm=7:printchr$(18)"[159]"rn$(rm):goto1170
1100 ifw1>6andw1<10andw2=7thenprint"[212]he door is stuck!":goto70
1110 print"[196]o what?":goto70
1120 ifw1<7thenw2=w1
1130 ifrm=5andw2=2andmp(rm,w2)=0thenprint"[195]an't [212]he door's locked.":goto70
1140 ifrm=2andw2=1and(ob(6)>0orob(7)>0)then1470
1150 ifmp(rm,w2)=0thenprint"[211]omething solid hits you in the face.":goto70
1160 rm=mp(rm,w2):printchr$(18)"[159]"rn$(rm)
1170 ifmp(rm,7)=0thenmp(rm,7)=1:gosub870:goto70
1180 goto70
1190 z=1:w=len(a$):y=.5:a=-1:fori=ztow:j=asc(mid$(a$,i,z)):x=j*y
1195 ifx=int(x)thenprintchr$(j-a);:next:print:return
1200 printchr$(j+a);:next:print:return
1210 rem map
1220 data 2,0,3,5,0,0
1230 data 0,1,10,0,0,0
1240 data 0,4,0,1,0,0
1250 data 3,0,0,0,0,0
1260 data 0,0,1,0,0,0
1270 data 5,0,0,0,0,0
1280 data 1,0,0,0,0,0
1290 data 0,5,0,0,9,0
1300 data 0,0,0,0,9,8
1310 data 0,0,0,2,0,0
1320 data n,s,e,w,u,d,go,ent,wal
1330 data tak,get,dro,lea,l,loo,exa,oil,tim,i,inv,pus,unl
1340 data nor,sou,eas,wes,up,dow,tow,she,doo,but,red,yel,gre,ele
1350 data "[195]ourtyard","[194]y the gates","[197]. courtyard","[199]ap in wall"
1360 data"[215]. courtyard","[211]tables","[212]ool shed"
1365 data"[212]ower","[212]ower","[199]uard quarters"
1370 data can,"an oil can",7,box,"a black box",10,sho,"an old shovel",7
1380 data key,"a key",11,gar,"a garlic bloom",6
1390 data bat,"a car battery",8,mag,"an electromagnet",4
1400 print:print"[208]lay again ([217]/[206])":poke198,0:wait198,1:geta$
1410 ifa$<>"n"thenrun
1420 print"[194]etter luck next time!":fori=1to1000:next:goto60000
1430 a$="[216]nt!pthud!rteedomx!@sd!houdsstqude!cx":gosub1190
1440 a$="@o!nwdsqnvdshof!w@lqhsd/![201]d!u@jdr!nod":gosub1190
1450 a$="rohgg!ng!xnts!f@smhb-!ruhbjr!tq!ihr":gosub1190
1460 a$="onrd!@oe!uido!gmhdr!@v@x/":gosub1190:return
1470 a$="[192]!finrumx!johfiu!ho!@!gtmm!rthu!ng":gosub1190
1480 a$="@slns!sdgtrdr!un!mdu!xnt!q@rr/":gosub1190:goto70
1490 a$="[213]id!finrumx!ft@se!hr!@qq@sdoumx!rb@sde":gosub1190
1500 a$="ng!uid!l@fodu!@oe!sdgtrdr!un!bnld!od@s":gosub1190
1510 a$="xnt/![216]nt!wdsx!b@rt@mmx!rusnmm!ntu!ng":gosub1190
1520 a$="uid!b@rumd